package com.claimSettlement.service;

import com.claimSettlement.pojo.Policyholders;
import com.claimSettlement.pojo.Recognizee;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 客户微服务openFegin接口
 * 曹文韬
 */
@FeignClient(value = "cloud-config-client")
public interface PolicyholdersOpenFeginService {
    @RequestMapping("/policyholders/getPolicyholdersAll")
    PageInfo<Policyholders> getPolicyholdersAll(@RequestParam("page") int page);

    @RequestMapping("/policyholders/selectPolicyholdersByNameOrCredenId")
    PageInfo<Policyholders> selectPolicyholdersByNameOrCredenId(@RequestParam("name") String name,@RequestParam("credenId") String credenId,@RequestParam("page") int page);

    @RequestMapping("/policyholders/getPolicyholdersById")
    Policyholders getPolicyholdersById(@RequestParam("policyholdersId") int policyholdersId);

    @RequestMapping(value = "/policyholders/insPolicyholders", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String insPolicyholders(@RequestBody Policyholders policyholders);

    @RequestMapping(value = "/policyholders/updPolicyholders", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String updPolicyholders(@RequestBody Policyholders policyholders);

    @RequestMapping(value = "/policyholders/delPolicyholders",produces = "text/html;charset=UTF-8")
    String delPolicyholders(@RequestParam("policyholdersId") int policyholdersId);

    @RequestMapping("/policyholders/getPolicyholdersAll2")
    List<Policyholders> getPolicyholdersAll2();

    @RequestMapping("/recognizee/getRecognizeeAll")
    PageInfo<Recognizee> getRecognizeeAll(@RequestParam("page") int page);

    @RequestMapping("/recognizee/getRecognizeeByNameOrCredentialsId")
    PageInfo<Recognizee> getRecognizeeByNameOrCredentialsId(@RequestParam("name") String name,@RequestParam("credentialsId") String credentialsId,@RequestParam("page") int page);

    @RequestMapping("/recognizee/getRecognizeeById")
    Recognizee getRecognizeeById(@RequestParam("recognizeeId") int recognizeeId);
    
    @RequestMapping(value = "/recognizee/insRecognizee", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String insRecognizee(@RequestBody Recognizee recognizee);

    @RequestMapping(value = "/recognizee/updRecognizee", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String updRecognizee(@RequestBody Recognizee recognizee);

    @RequestMapping(value = "/recognizee/delRecognizee",produces = "text/html;charset=UTF-8")
    String delRecognizee(@RequestParam("recognizeeId") int recognizeeId);

    @RequestMapping(value = "/recognizee/getRecognizeePid")
    List<Recognizee> getRecognizeePid();

    @RequestMapping("/policyholders/getPolicyholdersNameAndId")
    List<Policyholders> getPolicyholdersNameAndId();
}
